import request from '@/utils/request';

/**
 * 查询产品库产品列表
 *
 * @param {object} query
 */
export const listContent = (query:any) => {
	return request({
		url: '/manage/content/list',
		method: 'get',
		params: query
	});
};

/**
 * 查询区域产品库产品列表
 *
 * @param {object} query
 */
export const qyListContent = (query:any) => {
	return request({
		url: '/manage/content/regionlList',
		method: 'get',
		params: query
	});
};

/**
 * 查询产品库产品详细
 *
 * @param {string} id
 */
export const getContent = (id:any) => {
	return request({
		url: '/manage/content/' + id,
		method: 'get'
	});
};

/**
 * 新增产品库产品
 *
 * @param {object} data
 */
export const addContent = (data:any) => {
	return request({
		url: '/manage/content/add',
		method: 'post',
		data: data
	});
};

/**
 *  修改产品库产品
 *
 * @param {object} data
 */
export const updateContent = (data:any) => {
	return request({
		url: '/manage/content/edit',
		method: 'put',
		data: data
	});
};

/**
 * 删除产品库产品
 *
 * @param {string} id
 */
export const delContent = (id:any) => {
	return request({
		url: '/manage/content/' + id,
		method: 'delete'
	});
};


